package com.iris.live.services.data.models;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;

/**
 * Created by ThinkPad on 2016/9/27.
 */
public class 销售顾问分组ModelPK implements Serializable {
    private String 许可;
    private Integer 分组编号;

    @Column(name = "许可")
    @Id
    public String get许可() {
        return 许可;
    }

    public void set许可(String 许可) {
        this.许可 = 许可;
    }

    @Column(name = "分组编号")
    @Id
    public Integer get分组编号() {
        return 分组编号;
    }

    public void set分组编号(Integer 分组编号) {
        this.分组编号 = 分组编号;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        销售顾问分组ModelPK that = (销售顾问分组ModelPK) o;

        if (分组编号 != that.分组编号) return false;
        if (许可 != null ? !许可.equals(that.许可) : that.许可 != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = 许可 != null ? 许可.hashCode() : 0;
        result = 31 * result + 分组编号;
        return result;
    }
}
